//
//  MyXMPP.h
//  xmpp
//
//  Created by welldone on 13-8-7.
//  Copyright (c) 2013年 net.koina. All rights reserved.
//


#import "XMPP.h"
#import "MessageModel.h"





@protocol MyXMPPDelegate <NSObject>

@optional
//上线
- (void)newBuddyOnline:(NSString *)buddyName;
- (void)buddyWentOffline:(NSString *)buddyName;

-(void)xmppStateChange:(NSString*)state;

//消息
- (void)newMessageReceived:(MessageModel *)messageContent;
@end



@interface MyXMPP : NSObject

@property (nonatomic , strong) XMPPStream *xmppStream;
@property (nonatomic , weak) id<MyXMPPDelegate> delegate;


+ (MyXMPP *)sharedMyXMPP;


- (BOOL)connect;

- (void)disconnect;


- (void)sendMessage:(NSString *)txtStr toUser:(NSString *) user;



@end
